package com.roc.jpamysql.controller;


import com.roc.jpamysql.annotation.SysLog;
import com.roc.jpamysql.model.Film;
import com.roc.jpamysql.model.LogInfo;
import com.roc.jpamysql.service.ILogInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author roc
 * @since 2024-03-23
 */
@RestController
@RequestMapping("/log-info")
@Api(value = "LOG 模块")
public class LogInfoController {

    @Resource
    ILogInfoService logInfoService;


    @GetMapping("/getSysLog")
    @ApiOperation(value = "获取日志", notes = "根据 id 获取日志")
    public LogInfo getSysLog(@RequestParam @ApiParam("日志 id") Integer logId) {
        return logInfoService.getById(logId);
    }


}
